Integrand size = 25, antiderivative size = 126 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\frac {C x}{b^2}+\frac {2 a \left (A b^2-a^2 C+2 b^2 C\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} b^2 (a+b)^{3/2} d}-\frac {\left (A b^2+a^2 C\right ) \sin (c+d x)}{b \left (a^2-b^2\right ) d (a+b \cos (c+d x))} \]
C*x/b^2+2*a*(A*b^2-C*a^2+2*C*b^2)*arctan((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a +b)^(1/2))/(a-b)^(3/2)/b^2/(a+b)^(3/2)/d-(A*b^2+C*a^2)*sin(d*x+c)/b/(a^2-b ^2)/d/(a+b*cos(d*x+c))
Time = 0.94 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.98 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\frac {C (c+d x)-\frac {2 a \left (-A b^2+\left (a^2-2 b^2\right ) C\right ) \text {arctanh}\left (\frac {(a-b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )}{\left (-a^2+b^2\right )^{3/2}}-\frac {b \left (A b^2+a^2 C\right ) \sin (c+d x)}{(a-b) (a+b) (a+b \cos (c+d x))}}{b^2 d} \]
(C*(c + d*x) - (2*a*(-(A*b^2) + (a^2 - 2*b^2)*C)*ArcTanh[((a - b)*Tan[(c + d*x)/2])/Sqrt[-a^2 + b^2]])/(-a^2 + b^2)^(3/2) - (b*(A*b^2 + a^2*C)*Sin[c + d*x])/((a - b)*(a + b)*(a + b*Cos[c + d*x])))/(b^2*d)
Time = 0.54 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.20, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.320, Rules used = {3042, 3501, 25, 3042, 3214, 3042, 3138, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx\) |
\(\Big \downarrow \) 3501 |
\(\displaystyle -\frac {\int -\frac {a b (A+C)+\left (a^2-b^2\right ) C \cos (c+d x)}{a+b \cos (c+d x)}dx}{b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {a b (A+C)+\left (a^2-b^2\right ) C \cos (c+d x)}{a+b \cos (c+d x)}dx}{b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a b (A+C)+\left (a^2-b^2\right ) C \sin \left (c+d x+\frac {\pi }{2}\right )}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\frac {a \left (A b^2-C \left (a^2-2 b^2\right )\right ) \int \frac {1}{a+b \cos (c+d x)}dx}{b}+\frac {C x \left (a^2-b^2\right )}{b}}{b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a \left (A b^2-C \left (a^2-2 b^2\right )\right ) \int \frac {1}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{b}+\frac {C x \left (a^2-b^2\right )}{b}}{b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\frac {2 a \left (A b^2-C \left (a^2-2 b^2\right )\right ) \int \frac {1}{(a-b) \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}d\tan \left (\frac {1}{2} (c+d x)\right )}{b d}+\frac {C x \left (a^2-b^2\right )}{b}}{b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {2 a \left (A b^2-C \left (a^2-2 b^2\right )\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b d \sqrt {a-b} \sqrt {a+b}}+\frac {C x \left (a^2-b^2\right )}{b}}{b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{b d \left (a^2-b^2\right ) (a+b \cos (c+d x))}\) |
(((a^2 - b^2)*C*x)/b + (2*a*(A*b^2 - (a^2 - 2*b^2)*C)*ArcTan[(Sqrt[a - b]* Tan[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*b*Sqrt[a + b]*d))/(b*(a^2 - b ^2)) - ((A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x] ))
3.6.73.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 + a^2*C))*Cos[e + f*x]*((a + b*S in[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^ 2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[a*b*(A + C)*(m + 1) - (A* b^2 + a^2*C + b^2*(A + C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Time = 1.69 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.30
method | result | size |
derivativedivides | \(\frac {\frac {-\frac {2 \left (A \,b^{2}+a^{2} C \right ) b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}+\frac {2 \left (A \,b^{2}-a^{2} C +2 b^{2} C \right ) a \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a -b \right ) \left (a +b \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{b^{2}}+\frac {2 C \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{2}}}{d}\) | \(164\) |
default | \(\frac {\frac {-\frac {2 \left (A \,b^{2}+a^{2} C \right ) b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}+\frac {2 \left (A \,b^{2}-a^{2} C +2 b^{2} C \right ) a \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a -b \right ) \left (a +b \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{b^{2}}+\frac {2 C \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{2}}}{d}\) | \(164\) |
risch | \(\frac {C x}{b^{2}}+\frac {2 i \left (A \,b^{2}+a^{2} C \right ) \left (a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}{b^{2} \left (-a^{2}+b^{2}\right ) d \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) A}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d}+\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) C}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d \,b^{2}}-\frac {2 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) C}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+a \sqrt {-a^{2}+b^{2}}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) A}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d}-\frac {a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+a \sqrt {-a^{2}+b^{2}}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) C}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d \,b^{2}}+\frac {2 a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+a \sqrt {-a^{2}+b^{2}}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) C}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) d}\) | \(579\) |
1/d*(2/b^2*(-(A*b^2+C*a^2)*b/(a^2-b^2)*tan(1/2*d*x+1/2*c)/(tan(1/2*d*x+1/2 *c)^2*a-b*tan(1/2*d*x+1/2*c)^2+a+b)+(A*b^2-C*a^2+2*C*b^2)*a/(a-b)/(a+b)/(( a-b)*(a+b))^(1/2)*arctan((a-b)*tan(1/2*d*x+1/2*c)/((a-b)*(a+b))^(1/2)))+2* C/b^2*arctan(tan(1/2*d*x+1/2*c)))
Time = 0.31 (sec) , antiderivative size = 534, normalized size of antiderivative = 4.24 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\left [\frac {2 \, {\left (C a^{4} b - 2 \, C a^{2} b^{3} + C b^{5}\right )} d x \cos \left (d x + c\right ) + 2 \, {\left (C a^{5} - 2 \, C a^{3} b^{2} + C a b^{4}\right )} d x - {\left (C a^{4} - {\left (A + 2 \, C\right )} a^{2} b^{2} + {\left (C a^{3} b - {\left (A + 2 \, C\right )} a b^{3}\right )} \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) + {\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cos \left (d x + c\right ) + b\right )} \sin \left (d x + c\right ) - a^{2} + 2 \, b^{2}}{b^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + a^{2}}\right ) - 2 \, {\left (C a^{4} b + {\left (A - C\right )} a^{2} b^{3} - A b^{5}\right )} \sin \left (d x + c\right )}{2 \, {\left ({\left (a^{4} b^{3} - 2 \, a^{2} b^{5} + b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{5} b^{2} - 2 \, a^{3} b^{4} + a b^{6}\right )} d\right )}}, \frac {{\left (C a^{4} b - 2 \, C a^{2} b^{3} + C b^{5}\right )} d x \cos \left (d x + c\right ) + {\left (C a^{5} - 2 \, C a^{3} b^{2} + C a b^{4}\right )} d x - {\left (C a^{4} - {\left (A + 2 \, C\right )} a^{2} b^{2} + {\left (C a^{3} b - {\left (A + 2 \, C\right )} a b^{3}\right )} \cos \left (d x + c\right )\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cos \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \sin \left (d x + c\right )}\right ) - {\left (C a^{4} b + {\left (A - C\right )} a^{2} b^{3} - A b^{5}\right )} \sin \left (d x + c\right )}{{\left (a^{4} b^{3} - 2 \, a^{2} b^{5} + b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{5} b^{2} - 2 \, a^{3} b^{4} + a b^{6}\right )} d}\right ] \]
[1/2*(2*(C*a^4*b - 2*C*a^2*b^3 + C*b^5)*d*x*cos(d*x + c) + 2*(C*a^5 - 2*C* a^3*b^2 + C*a*b^4)*d*x - (C*a^4 - (A + 2*C)*a^2*b^2 + (C*a^3*b - (A + 2*C) *a*b^3)*cos(d*x + c))*sqrt(-a^2 + b^2)*log((2*a*b*cos(d*x + c) + (2*a^2 - b^2)*cos(d*x + c)^2 - 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(d*x + c) - a^2 + 2*b^2)/(b^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + a^2)) - 2*(C*a^ 4*b + (A - C)*a^2*b^3 - A*b^5)*sin(d*x + c))/((a^4*b^3 - 2*a^2*b^5 + b^7)* d*cos(d*x + c) + (a^5*b^2 - 2*a^3*b^4 + a*b^6)*d), ((C*a^4*b - 2*C*a^2*b^3 + C*b^5)*d*x*cos(d*x + c) + (C*a^5 - 2*C*a^3*b^2 + C*a*b^4)*d*x - (C*a^4 - (A + 2*C)*a^2*b^2 + (C*a^3*b - (A + 2*C)*a*b^3)*cos(d*x + c))*sqrt(a^2 - b^2)*arctan(-(a*cos(d*x + c) + b)/(sqrt(a^2 - b^2)*sin(d*x + c))) - (C*a^ 4*b + (A - C)*a^2*b^3 - A*b^5)*sin(d*x + c))/((a^4*b^3 - 2*a^2*b^5 + b^7)* d*cos(d*x + c) + (a^5*b^2 - 2*a^3*b^4 + a*b^6)*d)]
Timed out. \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.34 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.60 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\frac {\frac {2 \, {\left (C a^{3} - A a b^{2} - 2 \, C a b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{{\left (a^{2} b^{2} - b^{4}\right )} \sqrt {a^{2} - b^{2}}} + \frac {{\left (d x + c\right )} C}{b^{2}} - \frac {2 \, {\left (C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + A b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (a^{2} b - b^{3}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b\right )}}}{d} \]
(2*(C*a^3 - A*a*b^2 - 2*C*a*b^2)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2* a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt( a^2 - b^2)))/((a^2*b^2 - b^4)*sqrt(a^2 - b^2)) + (d*x + c)*C/b^2 - 2*(C*a^ 2*tan(1/2*d*x + 1/2*c) + A*b^2*tan(1/2*d*x + 1/2*c))/((a^2*b - b^3)*(a*tan (1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 + a + b)))/d
Time = 9.17 (sec) , antiderivative size = 3862, normalized size of antiderivative = 30.65 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx=\text {Too large to display} \]
(2*C*atan(((C*((C*((32*(A*a^4*b^5 - A*a^2*b^7 - A*a^3*b^6 - C*b^9 + C*a^2* b^7 - 3*C*a^3*b^6 + C*a^5*b^4 + A*a*b^8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